/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.yournamehere.guice;

import com.google.inject.AbstractModule;
import com.google.inject.Scopes;
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.cfg.Configuration;
import org.yournamehere.model.User;

/**
 *
 * @author odpsoft
 */
public class MyModule extends AbstractModule {

    @Override
    protected void configure() {
        this.bind(Configuration.class).toInstance(new AnnotationConfiguration().addAnnotatedClass(User.class).configure());
        this.bind(Service.class).to(ServiceImp.class).in(Scopes.SINGLETON);
        this.bind(Service2.class).to(Service2Imp.class).in(Scopes.SINGLETON);
    }
}
